package com.acme.task4;
import java.util.Random;
public class Task4Arrays {

	static int addRand(){
		Random ran=new Random();
		int Tran=ran.nextInt(3);
		if (Tran==0){
			Tran=3;
		}
		if (Tran==1){
			Tran=7;
		}
		if (Tran==2){
			Tran=9;
		}
		return Tran;
	}
	
	public static void main(String[] args) {
		int mas[]=new int[10];
		int i;
		
		for(i=0;i<10;i++){
			mas[i]=Task4Arrays.addRand();
			System.out.print(mas[i]+" ");
		}
		
		int i3=0,i7=0,i9=0;
		for(i=0;i<10;i++){
			if (mas[i]==3){
				i3++;
			}
			if (mas[i]==7){
				i7++;
			}
			if (mas[i]==9){
				i9++;
			}
		}
		System.out.println();
		System.out.println("'3': " + i3);
		System.out.println("'7': " + i7);
		System.out.println("'9': " + i9);
	}

}
